package rhc.spider.signal;

import rhc.spider.signal.signalInterface.AddRequestSignal;
import rhc.spider.signal.signalInterface.CrawlerCloseSignal;
import rhc.spider.signal.signalInterface.CrawlerOpenSignal;
import rhc.spider.signal.signalInterface.ItemCatchSignal;
import rhc.spider.signal.signalInterface.SpiderCloseSignal;
import rhc.spider.signal.signalInterface.SpiderOpenSignal;
import rhc.spider.signal.signalTouch.AddRequestSignalTouch;
import rhc.spider.signal.signalTouch.CrawlerCloseSignalTouch;
import rhc.spider.signal.signalTouch.CrawlerOpenSignalTouch;
import rhc.spider.signal.signalTouch.ItemCatchSignalTouch;
import rhc.spider.signal.signalTouch.SpiderCloseSignalTouch;
import rhc.spider.signal.signalTouch.SpiderOpenSignalTouch;
import rhc.spider.util.SingleInstanceUtil;

public enum Signal {

	SPIDER_OPEN("spider open", SpiderOpenSignal.class, SingleInstanceUtil
			.getInstance(SpiderOpenSignalTouch.class)), SPIDER_COSE(
			"spider close", SpiderCloseSignal.class, SingleInstanceUtil
					.getInstance(SpiderCloseSignalTouch.class)), CRAWLER_OPEN(
			"crawler open", CrawlerOpenSignal.class, SingleInstanceUtil
					.getInstance(CrawlerOpenSignalTouch.class)), CRAWLER_CLOSE(
			"crawler close", CrawlerCloseSignal.class, SingleInstanceUtil
					.getInstance(CrawlerCloseSignalTouch.class)), ITEM_CATCH(
			"item catch", ItemCatchSignal.class, SingleInstanceUtil
					.getInstance(ItemCatchSignalTouch.class)), ADD_REQUEST(
			"add request", AddRequestSignal.class, SingleInstanceUtil
					.getInstance(AddRequestSignalTouch.class));

	public String desc;
	public Class connectClass;
	public SignalTouch touch;

	Signal(String desc, Class connectClass, SignalTouch touch) {
		this.desc = desc;
		this.connectClass = connectClass;
		this.touch = touch;
	}

	public String getDesc() {
		return desc;
	}

	public void setDesc(String desc) {
		this.desc = desc;
	}

	public Class getConnectClass() {
		return connectClass;
	}

	public void setConnectClass(Class connectClass) {
		this.connectClass = connectClass;
	}

	public SignalTouch getTouch() {
		return touch;
	}

	public void setTouch(SignalTouch touch) {
		this.touch = touch;
	}

}
